<template>
    <el-form label-width="100px" >
      <el-form-item label="备注">
        <el-col :span="12">
          <el-input
            type="textarea"
            :autosize="{ minRows: 2, maxRows: 4}"
            placeholder="请输入配置说明"
            v-model="detail.remark">
          </el-input>
        </el-col>
      </el-form-item>
    <el-form-item label="放弃原因">
      <el-col :span="12">
        <el-input
          type="textarea"
          :autosize="{ minRows: 2, maxRows: 4}"
          placeholder="请输入配置说明"
          v-model="detail.reason">
        </el-input>
      </el-col>
    </el-form-item>
      <el-button  type="primary" @click="close" style="position: relative;left: 250px;">返回</el-button>
    </el-form>
</template>

<script>
import { versionDetail } from '@/api/version/version'
export default {
  name: 'ConfigHistoryDetail',
  data () {
    return {
      detail: {
        remark: '',
        reason: ''
      }
    }
  },
  props: ['versionId'],
  created () {
    this.getData()
  },
  methods: {
    getData () {
      versionDetail(this.versionId).then(res => {
        if (res.code === 0) {
          this.detail.reason = res.data.disuseCause
          this.detail.remark = res.data.remark
        }
      })
    },
    close () {
      this.$emit('closeEdit', false)
    }
  }
}
</script>
